<script lang="ts"  setup>
import { reactive } from 'vue'

const searchForm = reactive({
  fileName: '',
  taskType: ''
})

const OPTIONS_TASK_TYPE = [{
  label: '全部',
  value: '',
},
{
  label: '手动excel导⼊任务',
  value: '1',
},
{
  label: '手动同步外部数据任务',
  value: '2',
}
]
//定义时间传递对象
const $emits = defineEmits(['searchParamsBtnEmits', 'resetParamsBtnEmits'])



//搜索用户信息参数传递
const searchBtn = () => {
  $emits('searchParamsBtnEmits', searchForm)
}

const resetBtn = () => {
  Object.assign(searchForm, {
    deptName: '',
    status: ''
  })
  $emits('resetParamsBtnEmits')
}
</script>

<template>
  <div class="search">
    <el-form :model="searchForm" >
      <el-row>
        <el-col :span="6">
          <el-form-item label="任务类型" label-width="80px">
          <el-select v-model="searchForm.taskType" >
            <el-option
              v-for="item in OPTIONS_TASK_TYPE"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            />
          </el-select>
        </el-form-item>
        </el-col>
        <el-col style="margin-left: 20px;"  :span="6" >
          <el-form-item label-width="100px" label="审核文件名称" >
            <el-input v-model="searchForm.fileName"  />
          </el-form-item>
        </el-col>

        <el-button  style="margin-left: 20px;" type="primary" @click="searchBtn">
          <el-icon>
            <Search />
          </el-icon>
          <span>查询</span>
        </el-button>
      </el-row>
    </el-form>
  </div>
</template>

<style scoped lang="less">
.search {
  //.el-form-item {
  //  font-weight: 700;
  //  padding: 0 30px 0 30px;
  // }

  margin-top: 20px;

  .el-col {
    margin-bottom: 20px;
  }

  .el-button {
    width: 80px;
  }
}
</style>
